function failIfFalse(condition, message)

% validate input
if(~isscalar(condition) || ~islogical(condition))
   error('Condition should be a logical value.'); 
end 

if(~ischar(message))
   error('Condition should be a logical value.'); 
end

if(condition == false)
    error(message);
end    
    
    
